import { ResPage, Cabinet, ResultData } from "@/api/interface/index";
import http from "@/api";

/**
 * @name 柜体管理模块
 */
// 获取柜体列表
export const getCabinetList = (params: Cabinet.ReqCabinetInfoParams) => {
  return http.post<ResPage<Cabinet.ReqCabinetInfoParams>>(`/troubleobviation/files/device/query`, params);
};
// 获取柜体详情
export const getCabinetDtl = (params: { deviceId: string }) => {
  return http.post<ResultData>(`/troubleobviation/files/device/detail`, params);
};
// 新增柜体
export const addCabinet = (params = {}) => {
  return http.post(`/troubleobviation/files/device/add`, params);
};
// 编辑柜体
export const editCabinet = (params: { deviceId: string }) => {
  return http.post(`/troubleobviation/files/device/modify`, params);
};

// 删除柜体
export const deleteCabinet = (params: { deviceList: { deviceId: string }[] }) => {
  return http.post(`/troubleobviation/files/device/remove`, params);
};

// 获取柜体选择列表
export const getCabinetSelList = (params = {}) => {
  return http.post(`/troubleobviation/files/device/selectionList`, params);
};
